<template>
  <div class="box">

  </div>
</template>

<script>

export default {
  name: 'WorkspaceJsonIndex',

  data() {
    return {
      options: {
      }
    };
  },
  props: {
    color: {
      type: Object,
      default: () => []
    },
    title: {
      type: Object,
      default: () => { }
    },
    tooltip: {
      type: Object,
      default: () => { }
    },
    grid: {
      type: Object,
      default: () => { }
    },
    xAxis: {
      type: Object,
      default: () => { }
    },
    yAxis: {
      type: Object,
      default: () => { }
    },
    series: {
      type: Array,
      default: () => { }
    },
    height: {
      type: [Number, String]
    },
    width: {
      type: [Number, String]
    }
  },


  mounted() {

    this.getDate()


  },
  created() {
    // this.$nextTick(this.getDate());

  },

  methods: {
    getDate() {
      let box = this.$echart.init(document.querySelector(".box"))
      this.options = this.$props
      box.setOption(this.options)
    }
  },
};
</script>

<style lang="scss" scoped>
	.box{
		width:100%;
		height:100%;
	}
</style>